<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>循环嵌套</title>
</head>

<body>
    <script>
        // 依次打印1-4，然后打印3次数。1，2，3,4  1，2，3,4，  1，2，3,4
        console.log('循环开始')
        for (var j = 1; j <= 3; j++) {
            for (var i = 1; i <= 4; i++) {
                console.log(i)
            }
        }
        console.log('循环结束')
    </script>
</body>

</html>